<include file="Public:header"/>
<style>
input{padding:6px;}
.title{background:#E2E8EB;width:180px;text-align:right;}
</style>
<table border="0" width="700px" align="center" cellspacing="3" cellpadding="3">
	<tr>
		<td class="title">SMTP服务器：</td>
		<td><input type="text" name="smtp_name" size="20" value="{$smtp_name}">如:smtp.qq.com、smtp.163.com</td>
	</tr>
	<tr>
		<td class="title">SMTP服务器端口：</td>
		<td><input type="text" name="smtp_port" size="20" value="{$smtp_port}">一般为25</td>
	</tr>
	<tr>
		<td class="title">SMTP服务器用户名：</td>
		<td><input type="text" name="user" size="20" value="{$user}">一般同下面email</td>
	</tr>
	<tr>
		<td class="title">发件人EMAIL：</td>
		<td><input type="text" name="from_email" size="20" value="{$from_email}"></td>
	</tr>
	<tr>
		<td class="title">发件人EMAIL密码：</td>
		<td><input type="text" name="pwd" size="20" value="{$pwd}"></td>
	</tr>
	<tr>
		<td class="title">发件人名称：</td>
		<td><input type="text" name="from_name" size="20" value="{$from_name}">此名称将显示为发件人名称</td>
	</tr>
</table>


<div id="save"><input type="button" id="change" value="保存修改" style="padding:2px"></div>

<script>
$("#change").click(function(){
   var smtp_name=$("[name=smtp_name]").val();
   var smtp_port=$("[name=smtp_port]").val();
   var user=$("[name=user]").val();
   var from_email=$("[name=from_email]").val();
   var pwd=$("[name=pwd]").val();
   var from_name=$("[name=from_name]").val();
   
   $.ajax({
        type:"POST",
		url:"__URL__/email_sys_save",
		dataType:"json",
		data:{"smtp_name":smtp_name,"smtp_port":smtp_port,"user":user,"from_email":from_email,"pwd":pwd,"from_name":from_name},
		success:function(data){
		    jSuccess("<strong>修改成功！</strong>",{TimeShown : 500,VerticalPosition : 'center',HorizontalPosition : 'center',onClosed:function(){location.reload();}})
       }
   })
})


</script>